import { createApp } from "vue";
import { createPinia } from "pinia";

import App from "./App.vue";
import router from "./router";

const app = createApp(App);

app.use(createPinia());
app.use(router);

// Element plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "./assets/resetstyle/reset.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
/* axios
	.post("http://xue.cnkdl.cn:9082/mall-admin/admin/login", {
		username: "admin",
		password: "123456",
	})
	.then(function (response) {
		const { code, message } = response.data;
		if (code == 200) {
			// http://xue.cnkdl.cn:9082/mall-admin/admin/login
			// 请求成功
			console.log(message);
		} else {
			// http://xue.cnkdl.cn:9082/mall-admin/admin/logi
			// 请求失败
			console.log(message);
		}
	})
	.catch(function (error) {
		// 超出2xx的范围都会触发
		// http://xue.cnkdl.cn:9082
		console.log(error.message);
	}); */
app.use(ElementPlus, {
	locale: zhCn,
});
app.mount("#app");
